import java.util.*;
public class lk6279 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int num[]={2,14,19,19,5,13,18,10,15,20};
        System.out.println(distinctPrimeFactors(num));
        
    }
    public static int distinctPrimeFactors(int[] nums) {
        long all=1l;
        HashSet hs=new HashSet<>();
        int n=nums.length;
         for(int i=2;i<1000;i++){
            if(fuck(i))
            for(int j=0;j<n;j++){
                if(nums[j]%i==0){
                    hs.add(i);
                }
            }
         }   
        return hs.size();
    }
    public static boolean fuck(int n){
        if(n==2){
            return true;
        }
        for(int i=2;i<=n/2;i++){
            if(n%i==0){
                return false;
            }
        }
        return true;
    }
}